﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_Master/AdminMaster2.master" AutoEventWireup="true" CodeFile="my_link.aspx.cs" Inherits="my_link" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="apply">
  <div class="apply2">
<%--   <uc_left_m:left_menu ID="left_m" runat="server" />--%>
    <div class="myul_r">
      <div class="mod_pad4">
<div class="hd_admin"><em class="ulimg_admin">友情链接</em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  href="my_link_edit.aspx?t=ad&c_id=0">添加</a>
</div>
<div class="admin_tab_box1">
          <div class="clear"></div>
       <div class="coupons">
            <table class="w top20" width="730" border="0" cellspacing="0" cellpadding="0">
              <tr class="t">
              <td width="30" class="c">序号</td>
              <td width="490" class="c">图片</td>    
              <td width="590" class="c">跳转路径</td>    
                <td width="490" class="c">操作</td>
              </tr>            
              <%if (tzlist != null && tzlist.Count > 0)
                { %>
                <%for (int k = 0; k < tzlist.Count; k++)
                  { %>
              <tr >
                <td class="cent_align"><%=(k+1)%></td>
                <td class="cent_align"><img  src="<%=tzlist[k].PicUrl%>" /></td>   
                <td class="cent_align"> <%=tzlist[k].WebAddress%></td>       
                <td>
                <a href="my_link_edit.aspx?t=edit&c_id=0&eid=<%=tzlist[k].Id%>&ino=<%=k%>" >编辑</a>
                &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:delthe('<%=tzlist[k].Id%>');" >删除</a></td>
              </tr>
              <%} %>
              <%}
                else
                { %>
             <tr>
                <td colspan='4'><div class='no_data'>^_^&nbsp;&nbsp;没有符合条件的数据！</div></td>
              </tr> 
              <%} %>             
            </table>
          </div>
          <div class="clear"></div>
        </div>
      </div>
    </div>
    <div class="clear"></div>
  </div>
  <div class="clear"></div>
</div>
<script language="javascript" type="text/javascript">
    function delthe(id) {
        if (confirm("删除后不能恢复！确定将此图删除？")) {           
                jQuery.ajax({
                    url: "/Ajax/Otsql.ashx",
                    data: { t: 'delete_link', long_eid: id },
                    type: "POST",
                    success: function (data) {
                        if (data + '' == 'True' || data + '' == 'true') {
                            alert("删除成功!");
                            window.location.reload();
                        } else {
                            alert('删除失败，请检查!');
                        }
                    }
                });          
        }
    }
</script>
</asp:Content>